﻿<%@ Page Title="" Language="C#" MasterPageFile="~/View/Main.Master" AutoEventWireup="true" CodeBehind="AddPieces.aspx.cs" Inherits="ArtClub.AddPieces" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="MainMenu" ContentPlaceHolderID="MainMenu" runat="server">
    <li><a href="BrowseCatalogue.aspx">Art Pieces</a>
    </li>
    <li><a href="BiddingInfoPage.aspx">Pieces for Bidding</a>
    </li>
    <li><a href="ChangeSystemDatePage.aspx">Subscription</a>
    </li>
</asp:Content>

<asp:Content ID="PageName" ContentPlaceHolderID="PageName" runat="server">
    Add Piece
</asp:Content>


<asp:Content ID="Submenu" ContentPlaceHolderID="Submenu" runat="server">
    <a href="BrowseCatalogue.aspx" class="list-group-item">Catalogue</a>
  
</asp:Content>

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
   
    <form id="form2" runat="server" enctype="multipart/form-data">
        <div class="row">
            <div class="col-xs-6 col-md-2">Name: </div>
            <div class="col-xs-6 col-md-4">
                <asp:TextBox ID="txtName" class="form-control" runat="server"></asp:TextBox>
            </div>


            <div class="col-xs-6 col-md-2">Artist: </div>
            <div class="col-xs-6 col-md-4">
                <asp:TextBox ID="txtArtist" class="form-control" runat="server"></asp:TextBox>
            </div>

        </div>
        <br />
        <div class="row">
            <div class="col-xs-6 col-md-2">Type: </div>
            <div class="col-xs-6 col-md-4">
                <asp:DropDownList ID="ddlType" runat="server" class="form-control"></asp:DropDownList>
               <%-- <asp:TextBox ID="txtType" class="form-control" runat="server"></asp:TextBox>--%>
            </div>


            <div class="col-xs-6 col-md-2">Original Price: </div>
            <div class="col-xs-6 col-md-4">
                <asp:TextBox ID="txtPrice" class="form-control" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ControlToValidate="txtPrice" ID="revNumber" ValidationExpression="^[0-9]+$" SetFocusOnError="true" runat="server" ErrorMessage="Number!"></asp:RegularExpressionValidator>
            </div>

        </div>
        <br />
        <div class="row">
            <div class="col-xs-6 col-md-2">Image: </div>
            <div class="col-xs-6 col-md-10">

                <input type="file" id="File2" name="myFile" />


            </div>

            <div class="col-xs-6 col-md-2">
            </div>
            <div class="col-xs-6 col-md-4">
            </div>
        </div>
        <br />
        <div class="row">
            <div class="col-xs-6 col-md-2">Description: </div>
            <div class="col-xs-6 col-md-7">
                <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" class="form-control" Rows="3"></asp:TextBox>

            </div>
        </div>

        <br />
        <div class="row">
            <div class="col-xs-6 col-md-4">
                <asp:Button class="btn btn-primary" runat="server" ID="btnUpload" OnClick="btnUploadClick" Text="  Add  " />
            </div>
        </div>

    </form>
       <br />
       <br />
    <div id="time" runat="server" style="display:none"></div>
<%--    <script type="application/javascript">
        var string = $("#MainContent_time").text();
        var myCountdownTest = new Countdown({
            time: string, width: 200, height: 80, rangeHi: 'minute'
        });



    </script>--%>

     

    <%--    <form id="AppPieceForm" runat="server" role="form">
        <h4>Add Art Pieces</h4>
        <div class="row">
            <div class="col-xs-6 col-md-2">Name: </div>
            <div class="col-xs-6 col-md-4">
                <asp:TextBox ID="txtName" class="form-control" runat="server"></asp:TextBox>
            </div>


            <div class="col-xs-6 col-md-2">Artist: </div>
            <div class="col-xs-6 col-md-4">
                <asp:TextBox ID="txtArtist" class="form-control" runat="server"></asp:TextBox>
            </div>

        </div>
        <br />
        <div class="row">
            <div class="col-xs-6 col-md-2">Type: </div>
            <div class="col-xs-6 col-md-4">
                <asp:TextBox ID="txtType" class="form-control" runat="server"></asp:TextBox>
            </div>


            <div class="col-xs-6 col-md-2">Original Price: </div>
            <div class="col-xs-6 col-md-4">
                <asp:TextBox ID="txtPrice" class="form-control" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ControlToValidate="txtPrice" ID="revNumber" ValidationExpression="^[0-9]+$" SetFocusOnError="true"  runat="server" ErrorMessage="Number!"></asp:RegularExpressionValidator>
            </div>

        </div>
        <br />
        <div class="row">
            <div class="col-xs-6 col-md-2">Image: </div>
            <div class="col-xs-6 col-md-10">
                <asp:AsyncFileUpload OnClientUploadError="uploadError"
                    OnClientUploadComplete="uploadComplete" runat="server"
                    ID="AsyncFileUpload1" Width="400px" UploaderStyle="Modern"
                    CompleteBackColor = "White"
                    UploadingBackColor="#CCFFFF"  ThrobberID="imgLoader"
                    OnUploadedComplete = "FileUploadComplete"
                  />
                <asp:Image ID="imgLoader" runat="server" ImageUrl = "~/images/loader.gif" />
                <asp:HiddenField ID="imagePath" runat="server" />
                <br />
                <asp:Label ID="lblMesg" runat="server" Text=""></asp:Label>
                <asp:ToolkitScriptManager ID="something" runat="server" />
                <script type = "text/javascript">
                    function uploadComplete(sender)
                    {
                        $get("<%=lblMesg.ClientID%>").innerHTML = "File Uploaded Successfully";
                    }

                    function uploadError(sender)
                    {
                        $get("<%=lblMesg.ClientID%>").innerHTML = "File upload failed.";
                    }
                </script>
            </div>

            <div class="col-xs-6 col-md-2">
            </div>
            <div class="col-xs-6 col-md-4">
            </div>
        </div>
        <br />
        <div class="row">
            <div class="col-xs-6 col-md-2">Description: </div>
            <div class="col-xs-6 col-md-7">
                <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" class="form-control" Rows="3"></asp:TextBox>

            </div>
        </div>

        <br />
        <div class="row">
            <div class="col-xs-6 col-md-4">
                <asp:Button ID="btnAdd" class="btn btn-default" runat="server" Text="Add"/>
            </div>
        </div>
        <br />
       

        
        </div>


    </form>--%>
</asp:Content>
